Devices having a tracking capability (such as a hand-held scanner) require navigation functionality in order to maintain awareness of the device's present position on a piece of work. The surface texture of the work can provide a frame of reference for navigation. A known effective technique for enabling such navigation is to shine light at an angle on the work, and to process the resulting reflection, which will include the surface texture shadow of the work. This technique enables navigation using, for example, the fiber texture on the surface of a piece of paper from which an image is being scanned.
Part of such a navigation technique is to filter an input signal representative of the resulting reflected image through a spatial filter (also often called a "DC removal filter" or a "DCR filter"). The spatial filter is used to enhance the high optical frequencies within the image so as to correspondingly sharpen edges within the image and to differentiate more clearly between regions of similar contrast.
In the digital domain, a digital input signal for a spatial filter typically comprises a stream of pixel values which, when organized into an array, correspond to pixels of the input image as seen by an array of photosensitive cells. The values in the input stream are representative of a color shade seen by the corresponding cells looking at the input image in pixelated form.
The filter itself is an array of filter coefficients. The values of the coefficients and their distribution within the array influence the filtration properties of the filter. To enable filtration, pixel values in the input stream are first organized into an input array. The filter array is then overlaid on "patches" of the input array, each patch indexed to a reference pixel for which the overlay is made. The coefficients are multiplied by the corresponding input values in the patch, and the sum of those products is an output value, or "filtered" value for the referenced pixel. Successive filtered values form a filtered output stream for the image.
This process is illustrated on FIGS. 1A, 1B, and 1C with reference to an exemplary filter array 110 standard in the art shown on FIG. 1B. Looking at FIG. 1A, input array 101 has filter array 110 (from FIG. 1B) overlaid as patch 102 successively indexed to first and second reference pixels 104 and 105. A series of multiplications 106 for each patch overlay is performed, the sum of these products being places in an output array 120 as shown on FIG. 1C.
As noted, the numeric value and the distribution of filtration coefficients within a filter array is highly influential on the properties of the filter. The filter array 110 in FIG. 1B is commonly known as a "highpass" filter, and is typical of filters standard in the art. While functional, such high pass filters leave room for improvement in several areas key to effective spatial filtration.
First, contrast and edge enhancement should be as "strident" as possible. While effective for sharp edges, prior art filters such as in FIG. 1B do not detect gradual changes in color shades well. When processing reflections off surface textures such as, for example, paper fiber, gradual shade changes should be expected to be encountered.
Second, the dynamic range of output values should be kept to a minimum to conserve storage processing resources. The numeric values of coefficients should be selected and distributed so that the sums of their products, patch by patch, are generally smaller numbers than the corresponding input values in the patch. This type of inherent compression is not always available in prior art filters.
Third, the objective of compressing output values notwithstanding, it is desirable to maximize the size of filter arrays to optimize signal to noise differentiation. It is well known that in digital processing, random noise decreases with an increase in the square root of the number of samples. The filter of FIG. 1B has only nine elements, four of which are zero. Thus, only five elements, or samples, are effective in optimizing the output signal's discernability over random noise.
Fourth, it is desirable for rows and/or columns in a filter array to "zero-balance" (i.e. for the numeric sum of their values to equal zero). This feature addresses a problem of offset injection in the input signal in systems with multiple paths to the filter. This offset is cancelled in a "zero-balanced" filter because the total value passed through the filter is zero on a per row or per column basis.
There is therefore a need in the art for a spatial filter that addresses these considerations.
There is a further need in the art to process input signals through a low latency spatial filter operating in a "streaming" fashion. Filters of the current art typically store an entire frame of input pixel values in a first memory region, and then, on a patch-by-patch basis, sequentially process all the coefficient multiplication operations. The products are then summed and stored in a second memory region. When all patches are completed, the output as stored in the second memory region is presented to the downstream hardware.
This type of batch processing causes slowdowns that could be remediated by more of a continuous and parallel processing of the input stream via, for example, FIFO buffers instead of first and second memory regions. Concurrent multiplication operations would also speed up processing.